#include<stdio.h>
int main()
{
    int a = 0;
    double b = 1;
    double c = 1;
    scanf("%d",&a);


    for(int i = 1;1<=a;i++)
    {
        b *=i;
        c+=1.0/b;




    }


    printf("%.10lf",c);

    return 0;
}